home *** CD-ROM | disk | FTP | other *** search
/ Resource for Source: C/C++ / Resource for Source - C-C++.iso / codelib9 / v_11_09 / 1109060a < prev    next >
Encoding:
Text File  |  1995-11-01  |  524 b   |  25 lines

  1. //  winstrm.h
  2.  
  3. #include    "ostrwnd.h"
  4.  
  5. const int winstreambuf_buf_size = 128;
  6. class winstreambuf : public streambuf
  7. {
  8. public:
  9. winstreambuf ();
  10. virtual int sync ();
  11. virtual int overflow (int nCh);
  12. virtual int underflow ()
  13.     {return EOF;}
  14. void set_stream_window (ostreamWnd * wnd)
  15.     {stream_window = wnd;}
  16.  
  17. private:
  18. void reset_buffer ()
  19.     {setp (buffer, buffer + winstreambuf_buf_size - 2);}
  20.     //  Keep epptr within buffer!
  21.  
  22. char buffer [winstreambuf_buf_size];
  23. ostreamWnd * stream_window;
  24. };
  25.